package com.xiaoli.study.consumer.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.xiaoli.study.api.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>Description: []</p>
 * Copyright (c) 2017 北京柯莱特科技有限公司
 * Created on 2018/3/27
 *
 * @author <a href="mailto: liruifeng@camelotchina.com">李瑞丰</a>
 * @version 1.0
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Reference(version = "1.0.0",
            application = "${dubbo.application.id}")
    private UserService userService;

    @GetMapping("/getUserById")
    public String getUserById() {
        return userService.getUserById(1L);
    }
}
